#!/usr/bin/env python3
"""
后端启动脚本
"""
import os
import sys

# 添加src目录到Python路径
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))

if __name__ == "__main__":
    from main import app
    import uvicorn
    from config import settings
    
    uvicorn.run(
        "main:app",
        host="0.0.0.0",
        port=8000,
        reload=settings.debug,
        log_level="info"
    )

    # cd d:\PythonProject\PythonChat\backend ; uv run python src/main.py